home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / formula1 / vcform1.z / NewReport.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-11  |  6.2 KB  |  185 lines

  1. VERSION 5.00
  2. Begin VB.Form NewReport 
  3.    Caption         =   "New Report"
  4.    ClientHeight    =   3225
  5.    ClientLeft      =   60
  6.    ClientTop       =   405
  7.    ClientWidth     =   4845
  8.    Icon            =   "NewReport.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   3225
  13.    ScaleWidth      =   4845
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.PictureBox pctDesignView 
  16.       BorderStyle     =   0  'None
  17.       Height          =   705
  18.       Left            =   945
  19.       Picture         =   "NewReport.frx":000C
  20.       ScaleHeight     =   705
  21.       ScaleWidth      =   705
  22.       TabIndex        =   10
  23.       Top             =   330
  24.       Visible         =   0   'False
  25.       Width           =   705
  26.    End
  27.    Begin VB.PictureBox pctColumnar 
  28.       BorderStyle     =   0  'None
  29.       Height          =   705
  30.       Left            =   945
  31.       Picture         =   "NewReport.frx":1B9E
  32.       ScaleHeight     =   705
  33.       ScaleWidth      =   705
  34.       TabIndex        =   9
  35.       Top             =   330
  36.       Visible         =   0   'False
  37.       Width           =   705
  38.    End
  39.    Begin VB.CommandButton btnCancel 
  40.       Cancel          =   -1  'True
  41.       Caption         =   "Cancel"
  42.       Height          =   375
  43.       Left            =   3720
  44.       TabIndex        =   4
  45.       Top             =   2760
  46.       Width           =   975
  47.    End
  48.    Begin VB.CommandButton btnOK 
  49.       Caption         =   "OK"
  50.       Default         =   -1  'True
  51.       Height          =   375
  52.       Left            =   2505
  53.       TabIndex        =   3
  54.       Top             =   2760
  55.       Width           =   975
  56.    End
  57.    Begin VB.ComboBox cboTables 
  58.       Height          =   315
  59.       Left            =   2520
  60.       TabIndex        =   2
  61.       Top             =   2280
  62.       Width           =   2175
  63.    End
  64.    Begin VB.ListBox lstReports 
  65.       Height          =   1815
  66.       Left            =   2520
  67.       TabIndex        =   1
  68.       Top             =   240
  69.       Width           =   2175
  70.    End
  71.    Begin VB.Frame Frame1 
  72.       Height          =   1935
  73.       Left            =   120
  74.       TabIndex        =   0
  75.       Top             =   120
  76.       Width           =   2295
  77.       Begin VB.PictureBox pctWizard 
  78.          BorderStyle     =   0  'None
  79.          Height          =   840
  80.          Left            =   780
  81.          Picture         =   "NewReport.frx":37A0
  82.          ScaleHeight     =   840
  83.          ScaleWidth      =   915
  84.          TabIndex        =   8
  85.          Top             =   180
  86.          Visible         =   0   'False
  87.          Width           =   915
  88.       End
  89.       Begin VB.PictureBox pctTabular 
  90.          BorderStyle     =   0  'None
  91.          Height          =   840
  92.          Left            =   780
  93.          Picture         =   "NewReport.frx":61BE
  94.          ScaleHeight     =   840
  95.          ScaleWidth      =   825
  96.          TabIndex        =   7
  97.          Top             =   180
  98.          Visible         =   0   'False
  99.          Width           =   825
  100.       End
  101.       Begin VB.Label lblDescription 
  102.          Alignment       =   2  'Center
  103.          Height          =   735
  104.          Left            =   120
  105.          TabIndex        =   6
  106.          Top             =   1080
  107.          Width           =   2055
  108.       End
  109.    End
  110.    Begin VB.Label Label1 
  111.       Caption         =   "Choose the table the object's data comes from:"
  112.       Height          =   495
  113.       Left            =   600
  114.       TabIndex        =   5
  115.       Top             =   2280
  116.       Width           =   1815
  117.    End
  118. Attribute VB_Name = "NewReport"
  119. Attribute VB_GlobalNameSpace = False
  120. Attribute VB_Creatable = False
  121. Attribute VB_PredeclaredId = True
  122. Attribute VB_Exposed = False
  123. Private Sub btnCancel_Click()
  124.     End
  125. End Sub
  126. Private Sub btnOK_Click()
  127.     NewReport.Hide
  128.     Select Case lstReports.Text
  129.         Case "Design View"
  130.             ReportWriter.F1Book1.Left = ReportWriter.F1Book1.Left + 2880
  131.             ReportWriter.F1Book1.Width = ReportWriter.Width - 2880
  132.             Call GetColumns(ReportWriter.lstFields, cboTables.Text)
  133.             ReportWriter.lstFields.Visible = True
  134.             ReportWriter.btnViewReport.Visible = True
  135.         Case "Report Wizard"
  136.             SelectFields.Show 1
  137.             ReportType = "Report Wizard"
  138.         Case "AutoReport:  Tabular"
  139.             ReportType = "AutoReport:  Tabular"
  140.             Call PopulateSheet
  141.         Case "AutoReport:  Columnar"
  142.             ReportType = "AutoReport:  Columnar"
  143.             Call PopulateColumnar
  144.     End Select
  145. End Sub
  146. Private Sub Form_Load()
  147.     Dim NumTables As Integer
  148.     ' Fill in listbox with report types.
  149.     lstReports.AddItem "Design View"
  150.     lstReports.AddItem "Report Wizard"
  151.     lstReports.AddItem "AutoReport:  Tabular"
  152.     lstReports.AddItem "AutoReport:  Columnar"
  153.     lstReports.ListIndex = 0
  154.     Call GetTables(cboTables)
  155. End Sub
  156. Private Sub lstReports_Click()
  157.     Select Case lstReports.Text
  158.         Case "Design View"
  159.             lblDescription.Caption = "Create a new report without using a wizard."
  160.             pctDesignView.Visible = True
  161.             pctWizard.Visible = False
  162.             pctTabular.Visible = False
  163.             pctColumnar.Visible = False
  164.         Case "Report Wizard"
  165.             lblDescription.Caption = "This wizard automatically creates your report based on the fields you choose."
  166.             pctDesignView.Visible = False
  167.             pctWizard.Visible = True
  168.             pctTabular.Visible = False
  169.             pctColumnar.Visible = False
  170.         Case "AutoReport:  Tabular"
  171.             lblDescription.Caption = "This wizard automatically creates a tabular report"
  172.             pctDesignView.Visible = False
  173.             pctWizard.Visible = False
  174.             pctTabular.Visible = True
  175.             pctColumnar.Visible = False
  176.         Case "AutoReport:  Columnar"
  177.             lblDescription.Caption = "This wizard automatically creates a columnar report"
  178.             pctDesignView.Visible = False
  179.             pctWizard.Visible = False
  180.             pctTabular.Visible = False
  181.             pctColumnar.Visible = True
  182.     End Select
  183.         
  184. End Sub
  185.